import { Component, Input, OnInit } from '@angular/core';

@Component({
  selector: 'app-data-form',
  templateUrl: './data-form.component.html',
  styleUrls: ['./data-form.component.less']
})
export class DataFormComponent implements OnInit {

  //表单主数据
  data: any;
  //表单主数据的keys
  keys: string[];
  //按钮
  save = false;
  edit = false;
  //操作
  saveFunction: Function;

  editFunction: Function;

  constructor() {
  }

  ngOnInit(): void {

  }

  doSave() {
    this.saveFunction.apply(null)
  }

  doEdit() {
    this.editFunction.apply(null)
  }

}
